#include <cstdio>
#include <cstdlib>
#include <string>
#include <iostream>
using namespace std;

class GiveGift
{
public:
	GiveGift(){}
	virtual ~GiveGift(){}
	virtual void GiveFlower() = 0;
	virtual void GiveDoll() = 0;
	virtual void GiveChocolate()=0;
};
//The class which finished the tasks. And also, the client cannot access

class Pursuit :public GiveGift
{
public:
	Pursuit(string iTarget):mTarget(iTarget){}
	~Pursuit(){}

	void GiveFlower()
	{
		std::cout<<"Deliver Flower to "<< mTarget<<endl;
	}
	virtual void GiveDoll() 
	{
		std::cout<<"Deliver Doll to "<<mTarget<<endl;
	}
	virtual void GiveChocolate()
	{
		std::cout<<"Deliver Chocolate to "<<mTarget<<endl;
	}

private:
	string mTarget;
};

class Proxy :public GiveGift
{
public:
	Proxy(string iTarget)
	{
		mpPursuit = new Pursuit(iTarget);
	}
	~Proxy()
	{
		if (mpPursuit)
		{
			delete mpPursuit;
		}
	}
	void GiveFlower()
	{
		mpPursuit->GiveFlower();
	}
	void GiveDoll()
	{
		mpPursuit->GiveDoll();
	}
	void GiveChocolate()
	{
		mpPursuit->GiveChocolate();
	}
private:
	Pursuit* mpPursuit;
};
int main()
{
	string lGirl("Girl1");
	Proxy lProxy(lGirl);
	lProxy.GiveDoll();
	lProxy.GiveChocolate();
	lProxy.GiveFlower();
	getchar();
	return 0 ;
}
